//
//  CBWebViewNoNaviController.swift
//  jrw
//
//  Created by cabinzhao on 5/26/17.
//  Copyright © 2017 武汉玖信普惠金融信息服务有限公司. All rights reserved.
//

import UIKit

class CBWebViewNoNaviController: CBWebViewController {

    let navBackgroundColor = UIColor(hex:0x0cb4fb)
    var nav:UIView?
    var leftBtn:UIButton?
    var titleLabl:UILabel?
    
    override func viewDidLoad() {
        super.viewDidLoad()

    }

    override func setUpNav() {
        nav = UIView(frame: CGRect(x: 0, y: 0, width: S_Width, height:((Screen.height == 812.0) ? 88 : 64)))
        view.addSubview(nav!)
        nav?.backgroundColor = navBackgroundColor
        titleLabl = UILabel(frame: CGRect(x: S_Width / 2 - 85, y: ((Screen.height == 812.0) ? 88 : 64)/2, width: 170, height: 21))
        titleLabl?.font = UIFont.systemFont(ofSize: 17.0)
        titleLabl?.textColor = UIColor.white
        titleLabl?.textAlignment = NSTextAlignment.center
        titleLabl?.text = "玖融网"
        nav?.addSubview(titleLabl!)
    }
    
    override func setupLeftBtnAction() {
        leftBtn = UIButton(type: UIButtonType.custom)
        leftBtn?.frame = CGRect(x: 0, y: ((Screen.height == 812.0) ? 88 : 64)/2-8, width: 60.0, height: 37.0)
        leftBtn?.setImage(UIImage(named: "list_return_white"), for: UIControlState.normal)
        leftBtn?.addTarget(self.view, action: #selector(self.view.removeFromSuperview), for: UIControlEvents.touchUpInside)
        nav?.addSubview(leftBtn!)
    }

}
